-- GENERATED SPELL FOR [Obsidion] --


function spell0_8400(pUnit, Event) --@Ground Smash,Self--
pUnit:FullCastSpellOnTarget(12734,pUnit)
pUnit:RegisterEvent('Sorts_8400', 2293, 1)
end

function spell1_8400(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(10101,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8400', 545, 1)
end

function Sorts_8400(pUnit, Event)
local choix_sorts_8400 = math.random(0, 1)
if choix_sorts_8400 == 0 then
pUnit:RegisterEvent('spell0_8400', 1, 1)
end
if choix_sorts_8400 == 1 then
pUnit:RegisterEvent('spell1_8400', 1, 1)
end
end

function mob8400_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8400', math.random(1500, 3000), 1)
end

function mob8400_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8400_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8400_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8400, 1, 'mob8400_Action')
RegisterUnitEvent(8400, 2, 'mob8400_Leave')
RegisterUnitEvent(8400, 3, 'mob8400_Kill')
RegisterUnitEvent(8400, 4, 'mob8400_Die')
